package grape.crm.rest.customer.mapper;

import grape.crm.service.customer.param.AddCustomerParam;
import grape.crm.service.customer.po.Customer;
import grape.common.rest.mvc.WebMapper;
import org.mapstruct.Mapper;
import grape.crm.rest.customer.form.CustomerCreateForm;
import grape.crm.rest.customer.form.CustomerUpdateForm;
import grape.crm.rest.customer.form.CustomerListPageForm;
import grape.crm.rest.customer.vo.CustomerVo;
import org.mapstruct.ReportingPolicy;
/**
 * <p>
 * 客户表 前端领域模型映射
 * </p>
 *
 * @author yangwei
 * @since 2020-09-14
 */
@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CustomerWebMapper extends WebMapper<CustomerVo, Customer> {

    Customer formToPo(CustomerCreateForm f);
    Customer formToPo(CustomerUpdateForm f);
    Customer formToPo(CustomerListPageForm f);
    AddCustomerParam formToParam(CustomerCreateForm f);
}
